package chapter3.No3_1_等待和通知机制.i等待wait的条件发生变化;

/**
 * Created by Administrator on 2016/11/18.
 */
public class Add {
    private String lock;

    public Add(String lock) {
        this.lock = lock;
    }

    public void add() {
        synchronized (lock) {
            ValueObject.list.add("test");
            lock.notifyAll();
        }
    }
}
